from tkinter import *

class main(object):

    def __init__(self):
        self.window = Tk()
        self.window.title("hello world")

        self.layoutTop = Frame(self.window)
        self.layoutTop.pack()

        self.url = ""
        self.entry_url = Entry(self.layoutTop, textvariable=self.url)
        self.btn_submit = Button(self.layoutTop, text="submit", command=self.submit())
        self.entry_url.grid(row=1, column=1)
        self.btn_submit.grid(row=1, column=2)

        self.txt_content = Text(self.window)
        self.txt_content.pack()
        self.txt_content.insert(END, "hello world \t")
        # self.txt_content.grid(row=1, column=1)

    def showView(self):
        self.window.mainloop()

    def submit(self):
        self.url = "http://www.baidu.com"
        self.txt_content.insert(END, "" + self.url)
        # print("url:" + self.url)

main().showView()